/**
 * Created by HIAPAD on 2017/12/22.
 */
import React from "react"
import PropTypes from "prop-types"
import "../../assets/css/base/cell.css"

class Cell extends  React.Component{
    constructor(props){
        super(props);
    }

    render(){
        if(this.props.right){
            return (
                <div className={this.props.newClass +' common-cell-ui'} >
                    <div className="common-cell-item">
                        <span className="cell-label">{this.props.label}</span>
                    </div>
                    <div className="common-cell-item">
                        {this.props.right}
                    </div>
                </div>

            )
        }else{
            return (
                <div className="common-cell-ui">
                    <div className="common-cell-item">
                        <span className="cell-label">{this.props.label}</span>
                    </div>
                    <div className="common-cell-item">
                        <span className="cell-value">{this.props.value}</span>
                    </div>
                </div>

            )
        }

    }
}

export default Cell